#pragma once
#include <QGraphicsTextItem>

namespace QtTutorial5
{
	class MyTextItem : public QGraphicsTextItem
	{
		Q_OBJECT
	public:
		MyTextItem(QGraphicsItem* inParent);
		MyTextItem(const QString& inText, QGraphicsItem* inParent);
		~MyTextItem();

	private:
		MyTextItem(const MyTextItem& that);
		MyTextItem& operator=(const MyTextItem& that);

	public:
		virtual bool event(QEvent *inEvent);

	protected:
		virtual void keyPressEvent(QKeyEvent *event);
		virtual void keyReleaseEvent(QKeyEvent *event);

	private:
		bool mTextSelected;
	};
}